//
//  TwitterPost.m
//  YaTc
//
//  Created by Roberto on 17/02/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "TwitterPost.h"


@implementation TwitterPost
@synthesize message, messageDate, imageLocation, user, userLocation, userId, postId, isDirectMessage;

- (id) initWithMessage: (NSString *) theMessage
{
	if ( ![super init] )
		return nil;

	message = theMessage;
	return self;
}

- (NSString *) description 
{
	return [NSString stringWithFormat:(@"[TwitterPost: (%@): %@]", user, message)];
}

- (void) dealloc
{
	[message release];
	[messageDate release];
	[imageLocation release];
	[user release];
	[userLocation release];
	[userId release];
	[super dealloc];
}

- (NSComparisonResult) compareDates: (TwitterPost *) anotherTwitterPost
{
	return [[anotherTwitterPost messageDate] compare:[self messageDate]];
}
@end
